-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Landscape): Send hostagent uid to WSL landscape client #360
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EduardGomezEscandell
changed the title
Send hostagent uid to WSL landscape client
feat(Landscape): Send hostagent uid to WSL landscape client
Oct 24, 2023
EduardGomezEscandell
force-pushed
the
landscape-client-hostagent-uid
branch
from
October 24, 2023 11:35
92103a1
to
9cbf554
Compare
didrocks
requested changes
Oct 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments and suggestions ahead!
It was reading the registry twice, with two mutex lock-unlocks. If we now add the need to read the hostagent UID, that would be a third time. So we simplify it to more basic operations.
This responsability has been shifted to the config.
There are now fewer, but different failure modes.
Otherwise, the Landcape back-end cannot match the WSL distros to this any agent.
Done in anticiption of adding a third test for the LandscapeAgentUID getter.
All default values are empty strings, and the linter was also complaining about readValue always receiving the same value for its 'defaultValue' argument. Hence, I simplified the code so that there are no default values, or rather the default values are always "". We can bring them back if we ever need one of the defaults to be non-empty.
EduardGomezEscandell
force-pushed
the
landscape-client-hostagent-uid
branch
from
October 25, 2023 13:57
9cbf554
to
c8b3916
Compare
Force-pushed to resolve conflict. Real changes start under this comment. |
didrocks
approved these changes
Oct 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! (once the tests pass ofc :))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The landscape client needs field
hostagent_uid
to match up the WSL distro with the Windows hostagent. See canonical/landscape-client#189Now the config needs to know the hostagent UID in order to put it in the provisioning tasks. To avoid circular dependencies, we shift the ownership of this data from the Landscape proservice to the Config.
At the moment it is put in the registry, but this is something that should not be permanent (what if the user has no write permission?).
From the user perspective, this means they don't even need to know about this hostagent UID.
UDENG-1588